package cqrtplm.dto;

import com.ty.basic.utils.excel.annotation.ExcelModel;
import com.ty.basic.utils.excel.annotation.ExcelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

@Data
@ExcelModel
public class ImportProcessDTO {
    // 基础信息
    @ExcelProperty(
            index = 1,
            name ="序号")
    private String id;

    @ExcelProperty(
            index = 2,
            name ="工步号")
    private String stepNumber;

    @ExcelProperty(
            index = 3,
            name ="工步名称")
    private String stepName;

    @ExcelProperty(
            index = 4,
            name = "工步内容")
    private String stepContent;

    // 零件信息
    @ExcelProperty(
            index = 5,
            name = "零件名称")
    private String partName;

    @ExcelProperty(
            index = 6,
            name = "零件件号")
    private String partNumber;

    @ExcelProperty(
            index = 7,
            name = "零件数量")
    private String partQuantity;

    @ExcelProperty(
            index = 8,
            name = "工装/工具/设备编码")
    private String ToolNumber;

    // 工装工具设备
    @ExcelProperty(
            index = 9,
            name = "工装/工具/设备名称")
    private String toolName;

    @ExcelProperty(
            index = 10,
            name = "工装/工具/设备规格")
    private String toolSpecifications;

    @ExcelProperty(
            index = 11,
            name = "辅料编码")
    private String MaterialNumber;

    // 辅料信息
    @ExcelProperty(
            index = 12,
            name = "辅料名称")
    private String materialName;

    @ExcelProperty(
            index = 13,
            name = "辅料数量")
    private String materialQuantity;

    @ExcelProperty(
            index = 14,
            name = "辅料规格")
    private String materialSpecifications;

    // 质量控制
    @ExcelProperty(
            index = 15,
            name = "质量控制点")
    private String qualityControlPoint;

    @ExcelProperty(
            index = 16,
            name = "技术要求")
    private String technicalRequirements;

    @ExcelProperty(
            index = 17,
            name = "特性")
    private String characteristic;

    @ExcelProperty(
            index = 18,
            name = "检验方法")
    private String inspectionMethod;

    @ExcelProperty(
            index = 19,
            name = "检验频次")
    private String inspectionFrequency;

    // 安全与生产
    @ExcelProperty(
            index = 20,
            name = "指定保护用具")
    private String protectionDevice;

    @ExcelProperty(
            index = 21,
            name = "节拍")
    private String cycleTime;  // 单位秒（根据实际业务确认）

    // 变更管理
    @ExcelProperty(
            index = 22,
            name = "更改来源")
    private String changeSource;

    @ExcelProperty(
            index = 23,
            name = "更改内容")
    private String changeContent;

    @ExcelProperty(
            index = 24,
            name = "处数")
    private Integer processingCount;

    // 其他
    @ExcelProperty(
            index = 25,
            name = "标记")
    private String mark;

    @ExcelProperty(
            index = 26,
            name = "图片")
    private String imagePath;  // 存储图片路径或base64编码


    public boolean isRowEmpty() {
        return (StringUtils.isNotBlank(this.stepName)
                &&StringUtils.isNotBlank(this.cycleTime)
                &&StringUtils.isNotBlank(this.stepNumber)
                );
    }

}
